package de.tud.binpacking;

import de.tud.binpacking.ui.BinPackingUi;

public class Main

{
	
	public static void main(String args[]) {
		
		if(args.length == 0) {
			new BinPackingUi();
		} else {
			try {
				int nOrders = Integer.parseInt(args[0]);
				int capacity = Integer.parseInt(args[1]);
				int maxRuntime = Integer.parseInt(args[2]);
				String instPath = args[3];
				String resultsPath = args[4];
				
				new BinPackingUi(nOrders, capacity, maxRuntime, instPath, resultsPath);
			} catch (Exception e) {
				System.out.println("Something wrong with the parameters");
				System.out.println("Expected: javac " + Main.class.getName() + " [nOrders] [capacity] [maxRuntime] [instPath] [resultsPath]");
				System.out.print("Inserted: javac " + Main.class.getName());
				for (String arg : args) {
					System.out.print(" " + arg);
				}
			}
		}
	}
}
